package com.xcjh.module_ws.websocket.listener

import com.xcjh.module_ws.websocket.bean.ChatMsgBean
import com.xcjh.module_ws.websocket.bean.ReceiveWsBean

/**
 * @author zobo101
 * webSocket 返回的各种数据
 */
/**
 * 直播间群聊相关
 */
interface LiveRoomListener {

    /**
     * 进入房间成功
     */
    fun onEnterRoomInfo(isOk: Boolean, msg: ReceiveWsBean<*>)

    /**
     * 退出房间成功
     */
    fun onExitRoomInfo(isOk: Boolean, msg: ReceiveWsBean<*>)

    /**
     * 聊天信息
     */
    fun onRoomReceive(chat: ChatMsgBean)
}

/**
 * 与主播单聊相关
 */
interface C2CListener {

    //收到主播的消息
    fun onC2CReceive(chat: ChatMsgBean)
}

/**
 * 登录登出监听
 */
interface LoginOrOutListener {

    //收到主播的消息
    fun onLoginIn(isOk: Boolean, msg: ReceiveWsBean<*>)

    fun onLoginOut(isOk: Boolean, msg: ReceiveWsBean<*>)
}

/**
 * 任何消息
 */
interface WsListener {
    //string消息
    fun onReceive(msg: String)
}